Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scaffolding jdwp for new JDWP debugger project #62

Merged
merged 21 commits into from
Oct 13, 2023

Conversation

wekesa360
Copy link
Contributor

@wekesa360 wekesa360 commented Oct 11, 2023

This pull request addresses the issue #53, however I'm currently facing an issue with running the placeholder targets e.g buck2 run //projects/jdwp:main. An error is thrown as

From `load` at implicit location

Caused by:
    0: From `load` at prelude/prelude.bzl:8:6-29
    1: From `load` at prelude/native.bzl:15:6-45
    2: From `load` at prelude/apple/apple_macro_layer.bzl:14:5-36
    3: From `load` at prelude/apple/apple_rules_impl_utility.bzl:9:6-46
    4: From `load` at prelude/apple/apple_bundle_types.bzl:8:6-18
    5: From `load` at prelude/apple/debug.bzl:9:5-35
    6: Error evaluating module: `prelude//artifact_tset.bzl`
    7: Traceback (most recent call last):
         * prelude/artifact_tset.bzl:29, in <module>
             _tset = field([_ArtifactTSet, None], None),
       error: Found `_ArtifactTSet` instead of a valid type annotation. Perhaps you meant `"_ArtifactTSet"`?
         --> prelude/artifact_tset.bzl:29:13
          |
       29 |     _tset = field([_ArtifactTSet, None], None),
          |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
          |
       
Build ID: 0a784514-076a-44d5-80c9-42d81616c2e8
Jobs completed: 3. Time elapsed: 0.2s.
BUILD FAILED

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Oct 11, 2023
@michalgr
Copy link
Contributor

Hi !

The issue you're seeing is caused by incompatible versions of buck2 and 'prelude' module. It should go away if you rebase past 35f3021.

.buckconfig Outdated Show resolved Hide resolved
BUCK Outdated
@@ -0,0 +1,7 @@
# A list of available rules and their signatures can be found here: https://buck2.build/docs/api/rules/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this file can be deleted

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have deleted the file

projects/jdwp/.pyre_configuration Outdated Show resolved Hide resolved
@@ -0,0 +1,11 @@
jdwp_binary(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Buck does not know what jdwp_binary is, but you can tell it to build parts of python project with the following rules:

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have made some changes, and the targets run without errors or any blocker

toolchains/BUCK Outdated
@@ -0,0 +1,6 @@
load("@prelude//toolchains:genrule.bzl", "system_genrule_toolchain")

system_genrule_toolchain(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we will not need this, we will need to setup python toolchain like this

@michalgr
Copy link
Contributor

Looks good !

I noticed that pyre does not work yet, but we can handle that later.

Could you add the following copyright to BUCK and *.py files ?

# Copyright (c) Meta Platforms, Inc. and affiliates.

@michalgr michalgr merged commit 5d87f3b into facebookexperimental:main Oct 13, 2023
8 checks passed
wekesa360 added a commit to wekesa360/ExtendedAndroidTools that referenced this pull request Oct 26, 2023
* add buck2

* remove su

* update makefile

* initialize buck2

* add buck2 to root

* add buck2 to root

* Revert "merge auck2"

This reverts commit 8d22386, reversing
changes made to 238cfb0.

* merge buck2

* add placeholder targets

* update pyre configuration

* delete file

* remove buck2  and prelude with version conflicts

* update placeholder targets

* add a temp main py file

* update tests target

* update python toolchains

* add copyright

---------

Co-authored-by: Michael A. Wekesa <Michael A. Wekesa>
@wekesa360 wekesa360 deleted the scaffold-jdwp-buck2 branch October 31, 2023 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants